// deploy_test1.js
const { ethers } = require("hardhat");

async function main() {
  const [deployer] = await ethers.getSigners();

  //console.log("Deploying contracts with the account:", deployer.address);
  //console.log("Account balance:", (await deployer.getBalance()).toString());

  // 部署 Message 合约
  const Message = await ethers.getContractFactory("Message_test");
  const message = await Message.deploy();




  // 等待部署完成
  await message.waitForDeployment();

  console.log("Message deployed to:", message.target);

}

main()
  .then(() => process.exit(0))
  .catch((error) => {
    console.error("部署过程中出错:", error);
    process.exit(1);
  });
